Example Program
Heaviest Increasing Subsequence
Heaviest increasing subsequence code example
File "graph_algo_his.cpp"
This code example illustrates the heaviest increasing subsequence algorithm
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 |
Creation of a simple sequence and corresponding weights
8 | |
9 | |
10 | |
11 |
Out-parameter: A string of positions belonging to the heaviest increasing subsequence
12 |
Heaviest increasing subsequence and the corresponding weight
13 |
Console Output
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 |
SeqAn - Sequence Analysis Library - www.seqan.de